package com.bluestone.listener;

import java.beans.PropertyChangeEvent;

import com.bluestone.context.ContextBase;
import com.bluestone.util.Util;

public class AIVRListener implements IListener {

	public void execute(ContextBase context) {
		//set today dynamic parameter
		//need to do enhancement
		java.text.SimpleDateFormat format = new java.text.SimpleDateFormat("yyyy-MM-dd");
		java.util.Calendar cal = java.util.Calendar.getInstance();
		for(int i=0; i< 10; i++){
			String para = format.format(cal.getTime());
			if(i==0){
				Util.putDynamicPara("TODAY", para);
				context.addExecuteLog("put dynamic para:" + "TODAY" + "=" + para);
			}else{
				Util.putDynamicPara("TODAY"+i, para);
				context.addExecuteLog("put dynamic para:" + "TODAY"+i + "=" + para);
			}
			cal.add(cal.DAY_OF_YEAR, 1);
		}

	}


}
